﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Baik.Interface.Execution;
using Baik.Interface.Framework;
using Baik.Interface.Token;

namespace Baik.Interface.Expression
{
    public interface IExpressionParser
    {
        IExpression Parse (IQue<IToken> tokens);
        IExpression Parse(string code);
    }
    public interface IExpression
    {
        string AsString();
        IObject Evaluate();
        IObject Evaluate(IScope scope);
        ILocation Location { get; set; }
        
    }
    public interface ICall : IExpression
    {
        IExpression Reference { get; set; }
        IEnumerable<IExpression> Params { get; set; }
    }
    public interface IReference : IExpression
    {
        IExpression Host { get; set; }
        string Name { get; set; }
    }
    public interface IArrayReference : IExpression
    {
        IExpression Reference { get; set; }
        IExpression Index { get; set; }

    }
    public interface IAssigment : IExpression
    {
        IExpression Reference { get; set; }
        IExpression Value { get; set; }
    }

    public interface IFunctionLiteral : IExpression
    {
        IEnumerable<IExpression> Params { get; set; }
        IEnumerable<IExpression> Expressions { get; set; }
    }

    public interface IArrayLiteral : IExpression
    {
        IEnumerable<IExpression> Expressions { get; set; }
    }
    public interface IObjectLiteral : IExpression
    {
        IEnumerable<IAssigment> Assigments { get; set; }
        
    }
    public interface IReturn : IExpression
    {
        IExpression Value { get; set; }    
    }

    public interface IBoolean : IExpression
    {
        bool Value { get; set; }
    }
    public interface ITrue : IBoolean
    {
            
    }
    public interface IFalse : IBoolean
    {   

    }
    public interface IStringLiteral : IExpression
    {
        string Value { get; set; }
    }
    public interface INumberLiteral : IExpression
    {
        double Value { get; set; }
    }

    public interface IUndefined : IExpression
    {
        
    }
   
}
